package com.wngbms.multidatasource.learn;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;

@Slf4j
@Configuration
public class EnvironmentAwareLearn implements EnvironmentAware {
    // org.springframework.boot.ApplicationServletEnvironment
    private Environment environment;

    @Override
    public void setEnvironment(Environment environment) {
        this.environment = environment;
        log.info("====>get properties:[{}]", environment.getProperty("spring.demo.wngb.game"));
    }
}
